package com.qiangesoft.sms.aliyun.controller;

import com.qiangesoft.sms.aliyun.handler.SendHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 短信测试
 *
 * @author qiangesoft
 * @date 2024-04-30
 */
@RequestMapping("/sms")
@RestController
public class SmsController {

    @Autowired
    private SendHandler sendHandler;

    @GetMapping("/send")
    public Boolean send() {
        Map<String, Object> param = new HashMap<>();
        param.put("name", "张三");
        param.put("jwd", 111);
        param.put("address", "顶顶顶帆帆");
        return sendHandler.send("15883968757", param);
    }

}
